<template>
	<div>
		<el-table
			:data="tablelist"
			style="width: 100%"
            max-height="550"
		>
			<el-table-column
				v-for="(item, index) in colList"
				:key="index"
				:prop="item.props"
				:label="item.label"
                sortable
			></el-table-column>
			<el-table-column
				label="操作"
                v-if="opt"
				width="100">
				<template slot-scope="scope">
					<!-- <el-button type="primary" size="small">编辑</el-button> -->
                    <el-button type="danger" @click="remove(scope.row.id,scope.$index)" size="small">删除</el-button>
				</template>
			</el-table-column>
		</el-table>
	</div>
</template>


<script>
export default {
	props: ["colList", "tablelist","opt"],
	data() {
		return {
            
        };
    },
    
	methods: {
		formatter(row, column) {
			return row.address;
        },
        remove(id,index){
            this.$message({
                message:"暂无权限",
                type:"warning"
            })
            // this.tablelist.forEach((item,indexs)=>{
            //     if(item.id == id){
            //         this.tablelist.splice(indexs,1)
            //     }
            // });
        }
	}
};
</script>

<style lang="scss" scoped>
</style>